package com.ruoyi.project.system.commodity.servuce;

import com.ruoyi.project.system.commodity.domain.Brand;
import com.ruoyi.project.system.commodity.mapper.BrandMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BrandServiceImp implements BrandService{
    @Autowired
    BrandMapper brandMapper;

    @Override
    public void insertBrand(Brand brand) {
        brandMapper.insertBrand(brand);
    }

    @Override
    public List<Brand> queryBrands() {
        return brandMapper.queryBrands();
    }

    @Override
    public List<Brand> queryBrandsByName(String name, int status) {
        return brandMapper.queryBrandsByName(name, status);
    }

    @Override
    public void deleteBrandById(int id) {
        brandMapper.deleteBrandById(id);
    }

    @Override
    public void disableBrandById(int id) {
        brandMapper.disableBrandById(id);
    }

    @Override
    public void enableBrandById(int id) {
        brandMapper.enableBrandById(id);
    }

    @Override
    public void updateBrandById(Brand brand) {
        brandMapper.updateBrandById(brand);
    }

    @Override
    public int queryBrandsCount() {
        return brandMapper.queryBrandsCount();
    }
    @Override
    public List<Brand> queryBrandsPages(int start, int pageSize){
        return brandMapper.queryBrandsPages(start, pageSize);
    }


}
